<HTML><HEAD><TITLE>BfsInstance:solver_setup(+OptSense, +Solver, ++ListOfOptions)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(bfs)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>BfsInstance:solver_setup(+OptSense, +Solver, ++ListOfOptions)</H1>
Setup a bfs solver tree for bfs instance BfsInstance.
<DL>
<DT><EM>OptSense</EM></DT>
<DD>Optimisation direction: min or max
</DD>
<DT><EM>Solver</EM></DT>
<DD>Node relaxation solver
</DD>
<DT><EM>ListOfOptions</EM></DT>
<DD>List of solver options
</DD>
</DL>
<H2>Description</H2>
<P>
  Setup a new solver tree for the bfs instance BfsInstance. The tree
  will be associated with BfsInstance; BfsInstance must not already
  have a solver tree associated with it. Once the solver tree is setup,
  it can be optimised via solve/1. This predicate allow various
  options to be specified when setting up the  solver state via
  <TT>ListOfOptions</TT>.
</P><P>
  <TT>OptSense</TT> is the optimisation direction. <B>Note</B> that this
  is assumed to be the same as the sense of optimisation used in
  <TT>Solver</TT>. It is the user's responsibility to ensure 
  that this is in fact the case. <TT>OptSense</TT> is used internally
  for bound updates and pruning, and for node ordering with the built-in
  best-first and best-estimate node selection methods.
</P><P>
  <TT>Solver</TT> is the node relaxed problem solver. It is either a
  user-defined predicate or an eplex instance or handle, for which a
  built-in node relaxation solver is available.

</P><P>
ListOfOptions are:

<DL>

<P>
<DT><STRONG><TT>separation(+Separation)</TT></STRONG>
    <DD>Use the specified method to separate the current node.
    <TT>Separation</TT> is either a user-defined predicate, or one of
    the atoms <TT>fracvar, enhanced, strong, deg_est</TT>
    corresponding to the built-in separation methods. Note that the
    methods <TT>enhanced, strong, deg_est</TT> are only available when
    the node relaxation solver involves an eplex instance.
    <TT>Separation</TT> defaults to fracvar.

<P>
<DT><STRONG><TT>node_select(+Select)</TT></STRONG>
    <DD>Use the specified method (<TT>depth_first, best_first,
    best_estimate</TT>) to select the next open node for solution and
    separation. <TT>Select</TT> defaults to best_first.

<P>
<DT><STRONG><TT>alpha(?AlphaMin, ?AlphaMax)</TT></STRONG>
    <DD>When using estimate- or lower-bounding based dichotomic node
    separation methods the overall value assigned to branching on a
    particular variable or constraint is calculated as a weighted sum
    of the estimates obtained for the two branches it would produce.
    AlphaMin is the weighting given to the minimum of the two estimates
    and AlphaMax to the maximum. <TT>AlphaMin</TT> and <TT>AlphaMax</TT>
    are numbers and default to 2 and 1 respectively.

<P>
<DT><STRONG><TT>beta(?BetaConst, ?BetaPC, ?BetaLB)</TT></STRONG>
    <DD>When using estimate- or lower-bounding based node separation
    methods with a problem involving an eplex instance the estimate
    assigned to each branch produced by branching on a particular
    variable or constraint is calculated as a weighted sum  of the
    pseudo-cost estimate and the lower bound. BetaPC is the weighting
    given to the pseudo-cost estimate and BetaLB to the lower bound.
    BetaConst is a constant offset only used when linear regression is
    employed to update these values during search. <TT>BetaConst</TT>,
    <TT>BetaPC</TT>, <TT>BetaLB</TT> are numbers and default to 0, 1,
    1 respectively.

<P>
<DT><STRONG><TT>pseudo_cost(?PCInit, ?PCUpdate, ?PCRatio)</TT></STRONG>
    <DD>
    <P>When using estimate-based dichotomic node separation methods
    with a problem involving an eplex instance up and down pseudo-costs
    are assigned to each variable and generalised upper bound constraint 
    branch-point representing the estimated degradation in objective
    cost per unit change in variable or constraint value incurred on
    that branch.
    </P><P><TT>PCInit</TT> specifies the method used to initialise these
    values when a variable or constraint branch-point is first considered
    for branching:
    <DL>
    <DD><TT>average</TT> : the pseudocosts are initialised to the average
    of the observed changes in cost of all up or down branches in the
    search tree.
    <DD><TT>cost</TT> : variable pseudocosts are initialised to the
    objective cost coefficient of the variable, constraint branch-point
    pseudocosts to the average of the cost coefficients of variables
    involved.
    <DD><TT>calculated</TT> : the pseudocosts are initialised to a
    value calculated by performing a number of external solver iterations
    equal to <TT>(PCRatio * #iterations in root node)/(2* #fractional
    vars in root node)</TT>.
    </DL>
    The default is <TT>calculated</TT>.
    </P><P><TT>PCUpdate</TT> is an atom specifying the method used to
    update these values throughout the search tree once the variable
    or constraint has been branched on:
    <DL>
    <DD><TT>average</TT> : the pseudocosts are updated to the average
    of the observed changes in cost of all up or down branches in the
    search tree for that variable or constraint. 
    <DD><TT>first</TT> : the pseudocosts are fixed to the observed
    change in cost at the first up or down branch in the search tree for
    that variable or constraint.
    <DD><TT>last</TT> : the pseudocosts are fixed to the observed
    change in cost at the last up or down branch in the search tree for
    that variable or constraint.
    </DL>
    The default is <TT>average</TT>.
    </P><P><TT>PCRatio</TT> is a float between 0 and 1 and is used in
    calculating the number of external solver iterations to perform
    when explicitly calculating initial pseudo-cost estimates; the
    default value is 0.05. Setting small ratios will result in faster
    node separation, but the initial estimates for variables and
    constraints on which the branching decisions are taken will be less
    accurate. Setting larger values will result in more work being performed
    in node separation and better estimates for the branching
    decisions. The optimum value will be problem specific, although in 
    general the overhead of performing a total number of iterations
    more than a small ratio of the root node iterations will outweigh the
    benefit obtained.

<P>
<DT><STRONG><TT>lower_bound(+Limit)</TT></STRONG>
    <DD>When using lower-bounding based node separation methods with a
    problem involving an eplex instance, specify how many external solver
    iterations should be performed to calculate the lower bound.
    <TT>Limit</TT> is an integer and defaults to 1. Setting small
    values of iterations will result in faster node separation, but the
    lower bounds on which the branching decisions are taken will be less
    tight. Setting larger values will result in more work being performed
    in node separation and tighter lower bounds for the branching
    decisions. The optimum value will be problem specific, although in
    general the overhead of performing more than a few iterations will
    outweigh the benefit obtained.

<P>
<DT><STRONG><TT>int_tolerance(+IntTol)</TT></STRONG>
    <DD>Specify how far from integrality an integer variable's node
    solution can fall before it is considered for separation by the
    built-in separation methods. <TT>IntTol</TT> is a float and
    defaults to 0.00001.  
<P>
<DT><STRONG><TT>info_messages(+OnOff)</TT></STRONG>
    <DD>Specify whether information messages should be output at
    various points during solution. This option is most useful for
    debugging purposes. OnOff is one of the atoms <TT>on</TT> or
    <TT>off</TT>, the default is <TT>off</TT>.

</DL>
</P>
<H2>See Also</H2>
<A HREF="../../lib/bfs/integers-1.html">integers / 1</A>, <A HREF="../../lib/bfs/bfs_branch-1.html">bfs_branch / 1</A>, <A HREF="../../lib/bfs/node_info-5.html">node_info / 5</A>, <A HREF="../../lib/bfs/solver_setup-2.html">solver_setup / 2</A>, <A HREF="../../lib/bfs/solve-1.html">solve / 1</A>, <A HREF="../../lib/bfs/get-2.html">get / 2</A>, <A HREF="../../lib/bfs/var_get-3.html">var_get / 3</A>, <A HREF="../../lib/bfs/statistics-0.html">statistics / 0</A>
</BODY></HTML>
